package com.tarzan.edu.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.sql.Timestamp;

/**
 * @author liujinshan
 * @title: EduChapter
 * @projectName com.tarzan.edu.entity
 * @description: TODO 课程 章节实体
 * @date 2021/5/25 15:42
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EduChapter extends Model<EduChapter> {

    /**
     * 章节id
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 课程id
     */
    private String courseId;

    /**
     * 章节名称
     */
    private String title;

    /**
     * 排序
     */
    private long sort;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp modifiedTime;

}
